#include "PrecompiledHeader.h"
#include "ConfigurationPanels.h"
#include "ix86-32/iR5900-32.h"
/*
using namespace pxSizerFlags;

Panels::ValDanX_VUPanel::ValDanX_VUPanel( wxWindow* parent ) :
	BaseApplicableConfigPanel( parent )
{
	wxStaticBoxSizer& groupSizer = *new wxStaticBoxSizer( wxVERTICAL, this, _("VU") );
	struct CheckTextMess
	{
		wxString label, tooltip;
	};

	const CheckTextMess check_text[NUM_OF_VALDANX_VU] =
	{
		{
			_("Disable 4 core 32 bit mem write [RECOMMENDED]"),
			wxEmptyString
		},
		{
			_("Enable 2 core 32 bit mem write [RECOMMENDED]"),
			wxEmptyString
		},
		{
			_("Enable 1 core 32 bit mem write [RECOMMENDED]"),
			wxEmptyString
		},
		/*{
			_("Disable 128 bit mem write (!)"),
			wxEmptyString
		}*//*
		{
			_("Enable stable ASM code in microVU [RECOMMENDED]"),
			wxEmptyString
		},
		{
			_("Enable unstable ASM code in microVU [NOT RECOMMENDED]"),
			wxEmptyString
		},

	};
	for( int i=0; i<NUM_OF_VALDANX_VU; ++i )
	{
		groupSizer += (m_checkbox[i] = new pxCheckBox( this, check_text[i].label ));
		m_checkbox[i]->SetToolTip( check_text[i].tooltip );
	}
wxPanelWithHelpers* left	= new wxPanelWithHelpers( this, wxVERTICAL );
left->SetMinWidth( 200 );
wxButton* SpeedStable    = new wxButton( left, wxID_ANY, _("Default Speed Stable")    );
wxButton* SpeedUnStable  = new wxButton( left, wxID_ANY, _("Default Speed UnStable")  );
wxButton* SpeedWarning   = new wxButton( left, wxID_ANY, _("Default Speed Warning")   );
*left   += SpeedStable              | pxExpand;
*left += SpeedUnStable            | pxExpand;
*left  += SpeedWarning             | pxExpand;

*this	+= groupSizer         		 | pxCenter;
*this  += 20;
*this+= left			         	| pxExpand;

Connect( SpeedStable   -> GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ValDanX_VUPanel::AppStatusEvent_DefaultSpeed  ) );
Connect( SpeedUnStable -> GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ValDanX_VUPanel::AppStatusEvent_DefaultUnSpeed) );
Connect( SpeedWarning  -> GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ValDanX_VUPanel::AppStatusEvent_DefaultWarning) );
}

void Panels::ValDanX_VUPanel::Apply()
{

	Pcsx2Config::ValDanX_VUOptions& opts( g_Conf->EmuOptions.ValDanX_VU );
	for (int i = 0; i < NUM_OF_VALDANX_VU; i++)
    {
        if (m_checkbox[i]->GetValue())
        {
            opts.bitset |= (1 << i);
        }
        else
        {
            opts.bitset &= ~(1 << i);
        }
	}
}
void Panels::ValDanX_VUPanel::AppStatusEvent_DefaultSpeed( wxCommandEvent& evt )
{
		ValDanX_VUPanel::m_checkbox[0]->SetValue(  false );
		ValDanX_VUPanel::m_checkbox[1]->SetValue(  true  );
		ValDanX_VUPanel::m_checkbox[2]->SetValue(  true  );
		ValDanX_VUPanel::m_checkbox[3]->SetValue( true );
		ValDanX_VUPanel::m_checkbox[4]->SetValue( false );
}
void Panels::ValDanX_VUPanel::AppStatusEvent_DefaultUnSpeed( wxCommandEvent& evt )
{
		ValDanX_VUPanel::m_checkbox[0]->SetValue( false  );
		ValDanX_VUPanel::m_checkbox[1]->SetValue( true   );
		ValDanX_VUPanel::m_checkbox[2]->SetValue( true   );
		ValDanX_VUPanel::m_checkbox[3]->SetValue( true  );
		ValDanX_VUPanel::m_checkbox[4]->SetValue( true  );
}
void Panels::ValDanX_VUPanel::AppStatusEvent_DefaultWarning( wxCommandEvent& evt )
{
		ValDanX_VUPanel::m_checkbox[0]->SetValue( false );
		ValDanX_VUPanel::m_checkbox[1]->SetValue( true  );
		ValDanX_VUPanel::m_checkbox[2]->SetValue( true  );
		ValDanX_VUPanel::m_checkbox[3]->SetValue( true  );
		ValDanX_VUPanel::m_checkbox[4]->SetValue( true  );
}
void Panels::ValDanX_VUPanel::AppStatusEvent_OnSettingsApplied()
{
	const Pcsx2Config::ValDanX_VUOptions& opts( g_Conf->EmuOptions.ValDanX_VU );
	for( int i=0; i<NUM_OF_VALDANX_VU; ++i )
	{
		m_checkbox[i]->SetValue( !!(opts.bitset & (1 << i)) );
	}
}*/